Skip to content

check state instead of power state on change offering for ROOT volume#13271

Open
DaanHoogland wants to merge 2 commits into
apache:4.22from
shapeblue:ghi13261-changeOffering
Open

check state instead of power state on change offering for ROOT volume#13271
DaanHoogland wants to merge 2 commits into
apache:4.22from
shapeblue:ghi13261-changeOffering

Conversation

@DaanHoogland

Copy link
Copy Markdown
Contributor

Description

This PR...

Fixes: #13261

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates ROOT volume resize/offering-change validation for VMware to use the VM state (e.g., Stopped) instead of the VM power_state (e.g., PowerOff), addressing cases where VMware power state lags and incorrectly blocks disk offering changes.

Changes:

  • Switch VMware ROOT-volume validation from userVm.getPowerState() to userVm.getState() in resizeVolumeInternal.
  • Apply the same state-based validation in validateVolumeReadyStateAndHypervisorChecks.
  • Update corresponding log/error messages to reference Stopped state.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java
Comment thread server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java Outdated
Comment thread server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java Outdated
Comment thread server/src/main/java/com/cloud/storage/VolumeApiServiceImpl.java Outdated
@codecov

codecov Bot commented May 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 17.68%. Comparing base (21b2025) to head (69def68).

Files with missing lines Patch % Lines
...n/java/com/cloud/storage/VolumeApiServiceImpl.java 50.00% 0 Missing and 5 partials ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #13271   +/-   ##
=========================================
  Coverage     17.67%   17.68%           
- Complexity    15792    15797    +5     
=========================================
  Files          5922     5922           
  Lines        533165   533169    +4     
  Branches      65208    65212    +4     
=========================================
+ Hits          94242    94291   +49     
+ Misses       428276   428219   -57     
- Partials      10647    10659   +12     
Flag Coverage Δ
uitests 3.69% <ø> (ø)
unittests 18.76% <50.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 18274

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan test ol9 vmware-80u3

@blueorangutan

Copy link
Copy Markdown

@weizhouapache a [SL] Trillian-Jenkins test job (ol9 mgmt + vmware-80u3) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16328)

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

@blueorangutan test ol9 vmware-80u3

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins test job (ol9 mgmt + vmware-80u3) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-16356)
Environment: vmware-80u3 (x2), zone: Advanced Networking with Mgmt server ol9
Total time taken: 72915 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13271-t16356-vmware-80u3.zip
Smoke tests completed. 144 look OK, 5 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_deploy_more_vms_than_limit_allows Error 173.91 test_deploy_vms_in_parallel.py
ContextSuite context=TestListVolumes>:setup Error 0.00 test_list_volumes.py
test_02_list_cpvm_vm Failure 0.05 test_ssvm.py
test_04_cpvm_internals Failure 0.04 test_ssvm.py
test_01_volume_usage Failure 96.26 test_usage.py
test_01_vpn_usage Error 0.03 test_usage.py
test_03_live_migrate_VM_with_two_data_disks Error 37.38 test_vm_life_cycle.py
test_08_migrate_vm Error 28.32 test_vm_life_cycle.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-16370)
Environment: vmware-80u3 (x2), zone: Advanced Networking with Mgmt server ol9
Total time taken: 58063 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13271-t16370-vmware-80u3.zip
Smoke tests completed. 143 look OK, 6 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_DeployVmAntiAffinityGroup_in_project Error 129.66 test_affinity_groups_projects.py
test_DeployVmAntiAffinityGroup Error 16.97 test_affinity_groups.py
test_03_deploy_and_scale_kubernetes_cluster Failure 38.85 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.06 test_kubernetes_clusters.py
test_12_test_deploy_cluster_different_offerings_per_node_type Failure 117.42 test_kubernetes_clusters.py
test_13_test_add_external_nodes_to_cluster Failure 131.72 test_kubernetes_clusters.py
test_01_non_strict_host_anti_affinity Failure 149.30 test_nonstrict_affinity_group.py
test_02_non_strict_host_affinity Error 38.73 test_nonstrict_affinity_group.py
test_01_vpn_usage Error 1.08 test_usage.py
ContextSuite context=TestMigrateVMStrictTags>:setup Error 0.00 test_vm_strict_host_tags.py

@DaanHoogland DaanHoogland requested a review from winterhazel June 21, 2026 11:29
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16379)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian Build Failed (tid-16381)

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-16386)
Environment: vmware-80u3 (x2), zone: Advanced Networking with Mgmt server ol9
Total time taken: 76607 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr13271-t16386-vmware-80u3.zip
Smoke tests completed. 146 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestClusterDRS>:setup Error 0.00 test_cluster_drs.py
test_02_upgrade_kubernetes_cluster Failure 647.49 test_kubernetes_clusters.py
test_01_volume_usage Failure 93.13 test_usage.py
test_01_vpn_usage Error 1.07 test_usage.py

@DaanHoogland

Copy link
Copy Markdown
Contributor Author

test_01_vpn_usage Error 1.07 test_usage.py

seems the only consistent error. checking latest main...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to change offering of ROOT volume on VMware

4 participants